package com.globallogic.capacitaciones.hibernate.domain;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="custom_comment")
public class Comment extends PersistentObject{
	
	private String text;
	
	private Date created;
	
	@ManyToOne
	private Item item;
	
	@ManyToOne
	private User fromUser;
	
	
	
	
	
	public Comment() {
		super();
	}

	public Comment(String text, Date created, Item item, User fromUser) {
		super();
		this.text = text;
		this.created = created;
		this.item = item;
		this.fromUser = fromUser;
	}

	public String getText() {
		return text;
	}

	public Date getCreated() {
		return created;
	}

	public Item getItem() {
		return item;
	}

	public User getFromUser() {
		return fromUser;
	}	
}
